package Java03;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle{
	private int width;
	private int length;
	
	public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	public int getPerimeter(){
		return 2*(width+length);
	}
	public int getArea(){
		return width*length;
	}
}
class Circle
{
	private int radius;
	public Circle(int radius){
		this.radius=radius;
	}
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	public int getPerimeter(){
		return (int) (2*Math.PI*radius);
	}
	public int getArea(){
		return (int) (Math.PI*radius*radius);
	}
}

public class Java0303test {

	public static void main(String[] args) {
		Scanner In=new Scanner(System.in);
		Rectangle[] rectangles=new Rectangle[2];
		rectangles[0]=new Rectangle(In.nextInt(),In.nextInt());
		rectangles[1]=new Rectangle(In.nextInt(),In.nextInt());
		Circle[] circles=new Circle[2];
		circles[0]=new Circle(In.nextInt());
		circles[1]=new Circle(In.nextInt());
		System.out.println(rectangles[0].getPerimeter()+rectangles[1].getPerimeter()+circles[0].getPerimeter()+circles[1].getPerimeter());
		System.out.println(rectangles[0].getArea()+rectangles[1].getArea()+circles[0].getArea()+circles[1].getArea());
		 System.out.println(Arrays.deepToString(rectangles));
		 System.out.println(Arrays.deepToString(circles));
     }
}
